<?php

 /**
  * @package JooS
  * @subpackage PHPackager
  */

  require_once "JooS/PHPackager/File/Adapter.php";

  class JooS_PHPackager_File_Adapter_Tmp extends JooS_PHPackager_File_Adapter {
    /**
     *
     * @var string
     */
    private $_name = null;

    /**
     * @return string
     */
    public function get_name() {
      if ($this->_name === null) {
        $this->_name = tempnam(sys_get_temp_dir(), __CLASS__);
      }
      return $this->_name;
    }

    public function __destruct() {
      unlink($this->get_name());
    }
  }
